package com.lovenote.common.pojo;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;

/**
 * 短信息对象
 * @author xingkong1221
 *
 */
@Entity
@Table(name = "common_private_message")
public class PrivateMessage implements Serializable {
	private static final long serialVersionUID = 5824946414893498387L;

	@Id
	@Column(name = "id", length = 10)
	@GenericGenerator(name = "generator", strategy = "increment")
	@GeneratedValue(generator = "generator")
	private long id;
	
	@Column(name = "addressee", nullable = false, length = 10)
	private long addressee;
	
	@Column(name = "sender", nullable = true, length = 10)
	private long sender;
	
	@Column(name = "senderName", nullable = true, length = 20)
	private String senderName;
	
	@Column(name = "message", nullable = false, length = 400)
	private String message;
	
	@Column(name = "is_system", nullable = false)
	private boolean isSystem;
	
	@Column(name = "is_read", nullable = false)
	private boolean isRead;
	
	@Column(name = "read_time", nullable = true)
	private Date readTime;
	
	@Column(name = "dateline", nullable = true)
	private Date dateline;

	public long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}

	public long getAddressee() {
		return addressee;
	}

	public void setAddressee(long addressee) {
		this.addressee = addressee;
	}

	public long getSender() {
		return sender;
	}

	public void setSender(long sender) {
		this.sender = sender;
	}

	public String getSenderName() {
		return senderName;
	}

	public void setSenderName(String senderName) {
		this.senderName = senderName;
	}

	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}

	public boolean isSystem() {
		return isSystem;
	}

	public void setSystem(boolean isSystem) {
		this.isSystem = isSystem;
	}

	public boolean isRead() {
		return isRead;
	}

	public void setRead(boolean isRead) {
		this.isRead = isRead;
	}

	public Date getReadTime() {
		return readTime;
	}

	public void setReadTime(Date readTime) {
		this.readTime = readTime;
	}

	public Date getDateline() {
		return dateline;
	}

	public void setDateline(Date dateline) {
		this.dateline = dateline;
	}
	
}
